<?php
function showmsg($code,$msg=null,$type=null){
	echo json_encode(array(
			"statusCode" => $code,
			"message" => $msg,   //如果没有值，前端不会alert提示，
			"url"=>$type
	));
}
/**
 * json
 */
function jsonencode($str){
	$vesion = substr(PHP_VERSION,0,3);
	if($vesion<5.4){
		return urldecode(json_encode(url_encode($str)));
	}else{
		return json_encode($str,JSON_UNESCAPED_UNICODE);
	}
}